﻿#pragma once
#include "yzrutil.h"
#include "collection/ArrayList.hpp"
#include "soundbank/SoundbankResource.h"
#include "SF2GlobalRegion.h"
#include "SF2LayerRegion.h"

namespace yzrilyzr_soundbank{
	ECLASS(SF2Layer, public SoundbankResource){
	private:
	yzrilyzr_collection::ArrayList<std::shared_ptr<SF2LayerRegion>> regions;
	std::shared_ptr<SF2GlobalRegion> globalregion;
	public:
	SF2Layer(SF2Soundbank * soundBank);
	SF2Layer();
	yzrilyzr_lang::String getName()const override{
		return name;
	}
	void setName(const yzrilyzr_lang::String & name){
		this->name=name;
	}
	yzrilyzr_collection::ArrayList<std::shared_ptr<SF2LayerRegion>> & getRegions(){
		return regions;
	}
	std::shared_ptr<SF2GlobalRegion> getGlobalRegion(){
		return globalregion;
	}
	void setGlobalZone(std::shared_ptr<SF2GlobalRegion> zone){
		globalregion=zone;
	}
	yzrilyzr_lang::String toString() const override{
		return yzrilyzr_lang::String("Layer: ") + name;
	}
	};
}
